-
Notifications
You must be signed in to change notification settings - Fork 465
Updated network transform message #3743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop-2.0.0
Are you sure you want to change the base?
Conversation
Updated network transform message to include the missing reference from this problem : https://discussions.unity.com/t/targeted-network-transform-does-not-exist-but-it-does-exist-error-question/1637568/5
|
My first try at making a merge request, correct me in stuff please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than adding information with no context, it's best if the existing debug log is updated to include the missing information.
Thank you for your contribution!
| if (transform == null) | ||
| { | ||
| Debug.LogError($"[{nameof(NetworkTransformMessage)}][Invalid] Targeted {nameof(NetworkTransform)}, {nameof(NetworkBehaviour.NetworkBehaviourId)} ({networkBehaviourId}), does not exist! Make sure you are not spawning {nameof(NetworkObject)}s with disabled {nameof(GameObject)}s that have {nameof(NetworkBehaviour)} components on them."); | ||
| Debug.LogError(networkObject.gameObject.name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate that this fixes the issue of finding the name of the game object, however that name is being logged without any context. We prefer to ensure that our error logs have enough context to understand what the error message is trying to communicate.
A better fix would be to edit the log underneath and add the gameobject name into the existing log.
Updated network transform message to include the missing reference from this problem :
https://discussions.unity.com/t/targeted-network-transform-does-not-exist-but-it-does-exist-error-question/1637568/5
Purpose of this PR
Jira ticket
???
Changelog
Changed the way the error is displayed in console so it now correctly shows the problematic Network Objects name
Functional Testing
Manual testing :
Manual testing doneAutomated tests:
Covered by existing automated testsCovered by new automated testsDoes the change require QA team to:
Review automated tests?Execute manual tests?Provide feedback about the PR?If any boxes above are checked the QA team will be automatically added as a PR reviewer.
Backports